Fully Qualified Name: | Laminas\Mvc\View\Http\InjectTemplateListener |
Extends: | AbstractListenerAggregate |
Name | Description | Defined By |
---|---|---|
attach() | {@inheritDoc} | InjectTemplateListener |
detach() | {@inheritDoc} | AbstractListenerAggregate |
injectTemplate() | Inject a template into the view model, if none present | InjectTemplateListener |
isPreferRouteMatchController() | InjectTemplateListener | |
mapController() | Maps controller to template if controller namespace is whitelisted or mapped | InjectTemplateListener |
setControllerMap() | Set map of controller namespace -> template pairs | InjectTemplateListener |
setPreferRouteMatchController() | Sets the flag to instruct the listener to prefer the route match controller param over the class name | InjectTemplateListener |
{@inheritDoc}
Parameter Name | Type | Description |
---|---|---|
$events | ||
$priority |
Returns:
{@inheritDoc}
Parameter Name | Type | Description |
---|---|---|
$events |
Returns:
Inject a template into the view model, if none present
Template is derived from the controller found in the route match, and, optionally, the action, if present.
Parameter Name | Type | Description |
---|---|---|
$e | \MvcEvent |
Returns: void
Returns: bool
Maps controller to template if controller namespace is whitelisted or mapped
Parameter Name | Type | Description |
---|---|---|
$controller | string | controller |
Returns: string|bool template name or false if controller was not matched
Set map of controller namespace -> template pairs
Parameter Name | Type | Description |
---|---|---|
$map | array |
Returns: self
Sets the flag to instruct the listener to prefer the route match controller param over the class name
Parameter Name | Type | Description |
---|---|---|
$preferRouteMatchController | bool |
Returns: